package com.sun.showcase.controller.app.mall;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sun.showcase.biz.mall.service.SubjectClassifyService;
import com.sun.showcase.client.query.mall.SubjectClassifyQuery;
import com.sun.showcase.pojo.Result;

@Controller("appSubjectClassifyController")
@RequestMapping(value="/app/subjectClassify") 
public class SubjectClassifyController{
	
	@Autowired
	private SubjectClassifyService subjectClassifyService;
	
	private Result result = new Result();

	/**
	 * 全部数据SubjectClassify
	 */
	@ResponseBody
	@RequestMapping(value="list")
	public Result listAll() {
		SubjectClassifyQuery subjectClassifyQuery = new SubjectClassifyQuery();
		subjectClassifyQuery.setOrderColum("order_num");
		subjectClassifyQuery.setOrderRule("ASC");
		List<SubjectClassifyQuery> list = subjectClassifyService.listAll(subjectClassifyQuery);
		result.setSuccess(true);
		result.setMsg("成功！");
		result.setData(list);
		return result;
	}
}
